<template>
    <van-swipe v-if="banners.length" class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item v-for="(item,index) in banners" :key="index">
            <img v-lazy="item.img_url" alt="title"/>
        </van-swipe-item>
    </van-swipe>
</template>

<script>
    import {defineComponent} from "vue"

    export default defineComponent({
        props:{
            banners:Array,
            default(){
                return[]
            }
        },
        setup() {
            return {}
        },
    })
</script>

<style scoped>
img{
    width: 100%;
    height: auto !important;
}
</style>
